/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       skill_choice_dialog.h

	$Header: /game/skill_choice_dialog.h $

	$NoKeywords: $

 ************************************************************************/

#ifndef SKILL_CHOICE_DIALOG_H_INCLUDED
#define SKILL_CHOICE_DIALOG_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

// kill the 255+ character identifier warning.  Templates tend to exceed that easily.
#pragma warning( disable: 4786 )

#include "button_group.h"
#include "skill.h"

class t_adventure_map;
class t_hero;
class t_skill_icon;

// -------------------------------------------------------------------
// dialog to choose a skill for a hero
// -------------------------------------------------------------------
class t_skill_choice_dialog : public t_window
{
public:
	t_skill_choice_dialog( t_hero& hero, t_window* parent, t_adventure_map const & map );

	t_skill const& get_choice() const;
protected:
	void close_click( t_button* );
	void choose_skill( t_button* button, int id );
	void set_skill( t_skill const& skill );
	void set_skill_icons( t_skill_mastery const* skill_level );

	enum
	{
		k_skill_rows = 5,
		k_skill_columns = 4
	};

	std::vector<t_skill>	m_skills;
	t_window*				m_selection_frame; // show location of highlighted skill
	t_skill                 m_choice;
	t_bitmap_group_ptr		m_bitmaps;
	t_bitmap_group_ptr		m_skill_frame;
	t_hero const&			m_hero;
	t_button_group			m_button_group;
	t_skill_icon*	        m_skill_icons[k_skill_rows][k_skill_columns];
	t_text_window*			m_class_text;
	t_text_window*			m_damage_text;
	t_text_window*			m_hit_points_text;
};

inline t_skill const& t_skill_choice_dialog::get_choice() const
{
	return m_choice;
}

#endif // SKILL_CHOICE_DIALOG_H_INCLUDED